<?php
/**
 * @package Component Metromap for Joomla! 1.5
 * @version $Id: metromap.php 4 2010-08-17 13:58:48Z batyrkin $
 * @author Batyrkin Anton
 * @copyright (C) 2010- Batyrkin Anton
 * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 **/

defined('_JEXEC') or die();
require_once (JPATH_COMPONENT.DS.'controller.php');

// Require specific controller if requested
if($controller = JRequest::getVar('controller')) {
	$path = JPATH_COMPONENT.DS.'controllers'.DS.$controller.'.php';
    if (file_exists($path)) {
        require_once $path;
    } else {
        $controller = '';
    }
}

// Create the controller
$classname	= 'MetromapController'.ucfirst($controller);
$controller = new $classname();

// Perform the Request task
$controller->execute( JRequest::getVar('task'));

// Redirect if set by the controller
$controller->redirect();
?>